//
//  JSTextContentViewController.m
//  NiubilityProject
//
//  Created by Apple on 2018/5/23.
//  Copyright © 2018年 Apple. All rights reserved.
//

#import "JSTextContentViewController.h"
#import "TYAttributedLabel.h"

@interface JSTextContentViewController ()

@end

@implementation JSTextContentViewController


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}
- (TYAttributedLabel *)contenL{
    if (!_contenL) {
        _contenL = [[TYAttributedLabel alloc] initWithFrame:CGRectMake(10, 10, [UIScreen mainScreen].bounds.size.width - 20, [UIScreen mainScreen].bounds.size.height - 20)];
        [self.view addSubview:_contenL];
    }
    return _contenL;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (void)selectPageStyle{
    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"切换翻页效果" message:@"" preferredStyle:(UIAlertControllerStyleActionSheet)];
    UIAlertAction *act1 = [UIAlertAction actionWithTitle:@"None" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
        [[JSBookReaderManager sharedJSBookReaderManager].pageDelegate resetingBookPageStyle:0];
    }];
    UIAlertAction *act2 = [UIAlertAction actionWithTitle:@"Cover" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
        [[JSBookReaderManager sharedJSBookReaderManager].pageDelegate resetingBookPageStyle:1];
    }];
    UIAlertAction *act3 = [UIAlertAction actionWithTitle:@"Book" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
        [[JSBookReaderManager sharedJSBookReaderManager].pageDelegate resetingBookPageStyle:2];
    }];
    UIAlertAction *act4 = [UIAlertAction actionWithTitle:@"Scroll" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
        [[JSBookReaderManager sharedJSBookReaderManager].pageDelegate resetingBookPageStyle:3];
    }];
    [alert addAction:act1];
    [alert addAction:act2];
    [alert addAction:act3];
    [alert addAction:act4];
    [self presentViewController:alert animated:YES completion:nil];
}

+ (CGSize)renderSizeWithFrame:(CGRect)frame{
    
    return CGSizeZero;
}
@end
